<?php
final class SystemConfig {
	const DEVLOPMENT = 'development';
	const PRODUCTION = 'production';
	const TEST = 'testing';

	private static $runLevel = null;
	
	public static function getRunLevel() {
		if (self::$runLevel === null) self::$runLevel = defined('APPLICATION_ENV') ? APPLICATION_ENV : self::DEVLOPMENT;
		return self::$runLevel;
	}
	
	public static function setRunLevel($level) {
		if (!in_array($level, array(self::DEVLOPMENT, self::PRODUCTION, self::TEST))) {
			throw new Exception('run Level Type error!');
		}
		self::$runLevel = $level;
	}

}

